package edu.utn.tacs.grupouno.rest.implementations;

import org.junit.After;
import org.junit.Before;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import edu.utn.tacs.grupouno.hibernateconfiguration.HibernateProvider;
import edu.utn.tacs.grupouno.rest.api.AnalisisService;

public class AnalisisServiceIT extends AnalisisServiceImplTest {

	@Before
	@Override
	public void setUp() {
		ClassPathXmlApplicationContext testContext = new ClassPathXmlApplicationContext("beans-services.xml");
		service = testContext.getBean("analisisService", AnalisisService.class);
		HibernateProvider.getInstance().openSession();
	}
	
	@After
	public void tearDown() {
		HibernateProvider.getInstance().commit();
		HibernateProvider.getInstance().close();
	}
}
